package com.kyhd.audio.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.kyhd.audio.dao.model.AudioExchangeLog;

@Repository
public interface AudioExchangeLogRepository extends JpaRepository<AudioExchangeLog, Long>,JpaSpecificationExecutor<AudioExchangeLog> {

	@Transactional
	@Query(value="select t.* from audio_exchange_log t where t.content_novel_id=?1 and t.content_id=?2",nativeQuery=true )
	AudioExchangeLog getByNovelIdAndContentId(String novelId, String contentId);

}
